<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>短信设置</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="shortcut icon" href="favicon.ico">
<link href="#{$smarty.const.APP}#/View/template/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="#{$smarty.const.APP}#/View/template/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="#{$smarty.const.APP}#/View/template/css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="#{$smarty.const.APP}#/View/template/css/animate.css" rel="stylesheet">
<link href="#{$smarty.const.APP}#/View/template/css/style.css?v=4.1.0" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox float-e-margins">
				<div class="ibox-title">
					<h5>短信设置（短信接口为腾讯云服务商）</h5>
				</div>
				<form class="form-horizontal" method="post" action="#{$smarty.const.ACT}#/admin/Sms/sms_config/id/#{$one.id}#/">
					<div class="ibox-content">
						<div class="form-group">
							<label class="col-sm-2 control-label">App ID：</label>
							<div class="col-sm-10">
								<input name="appid" class="form-control" type="text" value="#{$one.appid}#" required/>
								<span class="conf_star_level-block m-b-none">短信网关帐号，详细请咨询厂家</span> </div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">App Key：</label>
							<div class="col-sm-10">
								<input name="appkey" class="form-control" type="text" value="#{$one.appkey}#" required/>
								<span class="conf_star_level-block m-b-none">短信网关帐号，详细请咨询厂家</span> </div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">签名：</label>
							<div class="col-sm-10">
								<input name="sign" class="form-control" type="text" value="#{$one.sign}#" required/>
								<span class="conf_star_level-block m-b-none">请参考为腾讯云短信接口配置说明</span> </div>
						</div>
					</div>
					<div class="ibox-content">
						<blockquote>默认短信发送模板</blockquote>
						<div class="form-group">
							<label class="col-sm-2 control-label">模板ID：</label>
							<div class="col-sm-10">
								<input name="tpl_id" class="form-control" type="text" value="#{$one.tpl_id}#" required/>
								<span class="conf_star_level-block m-b-none">请参考为腾讯云短信模板配置说明</span> </div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">参数变量：</label>
							<div class="col-sm-10">
								<textarea class="form-control" cols="60" rows="3" name="content">#{$one.content}#</textarea>
								<span class="conf_star_level-block m-b-none"> {1}=客户姓名：{realname} ,{2}=购买产品：{productname},{3}=开通时间：{bdt},{4}=结束时间：{edt} <br>
								假如模版 ID 对应的模板内容为： 您的{1}是{2}，请于{3}分钟内填写。如非本人操作，请忽略本短信。 ，则上面请求参数组合后下发的内容为： 【腾讯云】您的验证码是1234，请于4分钟内填写。如非本人操作，请忽略本短信。 </span> </div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<button class="btn  btn-w-m btn-info" type="submit">保存数据</button>
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
<!-- 全局js --> 
<script src="#{$smarty.const.APP}#/View/template/js/jquery.min.js?v=2.1.4"></script> 
<script src="#{$smarty.const.APP}#/View/template/js/bootstrap.min.js?v=3.3.6"></script> 

<!-- 自定义js --> 
<script src="#{$smarty.const.APP}#/View/template/js/content.js?v=1.0.0"></script> 

<!-- layer javascript --> 
<script src="#{$smarty.const.APP}#/View/template/js/plugins/layer/layer.min.js"></script> 
<script>
$(document).ready(function () {
	$('#get_sms_overage').click(function(){
		$.ajax({
			url:'#{$smarty.const.ACT}#/admin/Sms/get_sms_overage/',
			type:'POST', //GET
			async:true,    //或false,是否异步
			data:{
				name:'yang',age:25
			},
			timeout:5000,    //超时时间
			dataType:'json',    //返回的数据格式：json/xml/html/script/jsonp/text
			beforeSend:function(xhr){
				console.log(xhr)
				console.log('发送前')
			},
			success:function(data,textStatus,jqXHR){
				//自定页
				parent.layer.open({
					type: 1,
					area: ['340px', '215px'],
					shadeClose: true, //开启遮罩关闭
					content: '<div style="padding:20px;line-height:30px;">'+data.message+'</div>'
				});
				console.log(data)
				console.log(textStatus)
				console.log(jqXHR)
			},
			error:function(xhr,textStatus){
				console.log('错误')
				console.log(xhr)
				console.log(textStatus)
			},
			complete:function(){
				console.log('结束')
			}
		})
	})
});
</script>
</body>
</html>
